<%@ page language="java" import="java.util.*,bookstore.database.pojo.*"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	List<SalesTop> saleTop = new SalesTopDAO().findAll();
	int i = 1;
%>

<table width="100%" border="0.5">
	<tr bordercolor="0">
		<td colspan="3">
			<div align="center">
				<img src="img/newlist.jpg" width="213" height="34" />
			</div>
		</td>
	</tr>
	<tr bordercolor="0">
		<td colspan="3">
			<div align="center">
				<script language="javascript" src="banner.js">
</script>
			</div>
		</td>
	</tr>
	<tr bordercolor="0">
		<td colspan="3" bordercolor="0" bgcolor="#00FFFF">
			&nbsp;
		</td>
	</tr>
	<tr bordercolor="0">
		<td colspan="3">
			<div align="center">
				<img src="img/salelist.jpg" width="213" height="34" />
			</div>
		</td>
	</tr>
	<tr>
		<td width="33%" bordercolor="0">
			<div align="center">
				销售排名
			</div>
		</td>
		<td width="66%">
			<div align="center">
				书名
			</div>
		</td>
	</tr>
	<%
		for (SalesTop sale : saleTop) {
	%>
		<tr>
		<td bordercolor="0">
			<div align="center">
				<%=i++ %>
			</div>
		</td>
		<td>
			<div align="center">
			<%String bookPath = "bookDetail.do?isbn=" + sale.getId().getIsbn(); %>
				<a href="<%=bookPath %>"><%=sale.getId().getBname()%></a>
			</div>
		</td>
	</tr>
	<%
		}
	%>

</table>

